# 1编写学生类 2创建实例对象 3存储到列表中 4调用实例方法
class Student:

    school='学校'

    def __init__(self,xm,age):
        self.name = xm
        self.age = age

    def show(self):
        print(f'我叫{self.name},今年{self.age}岁')

stu=Student('wez',26)
stu2=Student('lsx',25)
stu3=Student('ww',27)
stu4=Student('ssq',24)

Student.school = '石家庄学院'

# 将对象存储到列表当中
lst=[stu,stu2,stu3,stu4]

for item in lst:
    item.show()
    print(item.school)